
const (: 'vector' (
  class [
    has (: 'x' 0 )
    has (: 'y' 0 )
    does (: '+' ( vector ) [
      ( this x ( + ( that x ) !) .)
      ( this y ( + ( that y ) !) .)
    ] )
  ]
  is (
    function (: ( class [ none param (: 'y' (number) 0 ) param (: 'x' (number) 0 ) ] ) [
      vector new ( x ( that x !) .) ( y ( that y !) .)
    ] )
  )
) )

var (: 'v1' ( vector (: 7 7 ) ) )
var (: 'v2' ( vector (: 3 4 ) ) )

( 'Adding vectors' delog .)

( v2 + ( v1 ) .)

( v2 x delog .)
( v2 y delog .)

